home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume11 / musbus / part01 next >
Encoding:
Internet Message Format  |  1987-09-16  |  50.4 KB

  1. Path: uunet!munnari!sources-request
  2. From: sources-request@munnari.oz
  3. Newsgroups: comp.sources.unix
  4. Subject: v11i029:  MUSBUS 5.0 -- Monash University Benchmark, Part01/04
  5. Message-ID: <1825@munnari.oz>
  6. Date: 17 Sep 87 08:12:21 GMT
  7. Sender: kre@munnari.oz
  8. Lines: 1884
  9. Approved: kre@munnari.oz.au
  10.  
  11. Submitted by: kenj@moncsbruce.oz.au (Ken McDonell)
  12. Mod.sources: Volume 11, Issue 29
  13. Archive-name: musbus/Part01
  14.  
  15.     [ This posting is way out of sequence with the rest of what's
  16.       happening in comp.sources.unix.  Sorry about that folks...
  17.       It was caused by a procedural screwup .. the numbers were
  18.       allocated way before the posting was ready.  So much for
  19.       attempting to streamline the posting process!  I think that
  20.       r$ and I have this dual moderator stuff in a much nicer state
  21.       now...  kre ]
  22.  
  23. MUSBUS Version 5.0 (Monash University Software for Benchmarking Unix Systems)
  24.  
  25. MUSBUS is a benchmarking tool that provides a test environment in which
  26. a system or application specific worload profile is used to drive simulated
  27. multi-user performance measurements; i.e. system throughput as seen by
  28. a terminal user as a function of concurrent load.  Some raw speed tests are
  29. also included for diagnostic and hypothesis formulation purposes.
  30.  
  31. MUSBUS has been used successfully in Australia, Europe and the USA 
  32. by equipment purchasers for comparative performance evaluation, in
  33. contractual acceptance tests, system shake-down to introduce stress
  34. and by vendors for in-house performance instrumentation.
  35.  
  36. A paper at the June 1987 Phoenix USENIX Meeting describes the philosophy
  37. underlying the MUSBUS design.
  38.  
  39. Complete documentation is in Intro.nr (no macros needed), whilst
  40. musbus.1 and README provide abbreviated notes, hints and descriptions.
  41.  
  42. Ken J. McDonell
  43. Department of Computer Science
  44. Monash University
  45. kenj@moncsbruce.oz.au    ..!uunet!munnari!moncsbruce.oz!kenj
  46.  
  47. #! /bin/sh
  48. # This is a shell archive, meaning:
  49. # 1. Remove everything above the #! /bin/sh line.
  50. # 2. Save the resulting text in a file.
  51. # 3. Execute the file with /bin/sh (not csh) to create the files:
  52. #    Adjust
  53. #    BSDtime.awk
  54. #    Config
  55. #    Groan
  56. #    Intro.nr
  57. #    Makefile
  58. #    Makefile,1
  59. #    README
  60. #    Results.files
  61. #    SysVtime.awk
  62. #    Tools.files
  63. #    Workload.files
  64. #    arith.c
  65. # This archive created: Thu Sep 17 06:46:18 EST 1987
  66. export PATH; PATH=/bin:$PATH
  67. echo 'x - Adjust'
  68. if test -f 'Adjust'
  69. then
  70.     echo 'shar: over-writing existing file Adjust'
  71. fi
  72. sed 's/^X//' > Adjust <<'End-of-File-Grunt'
  73. X#! /bin/sh
  74. X# $Header: Adjust,v 1.2 87/06/23 15:05:56 kjmcdonell Beta $
  75. Xif test $# -lt 1
  76. Xthen
  77. X    echo Usage: $0 logfile ...
  78. X    exit 1
  79. Xfi
  80. Xfor f
  81. Xdo
  82. X    awk '
  83. X/sqrt/             { print $0; flag=0; state=0; next }
  84. X/Arith/ && /arithoh/ { state=1; print $0; next }
  85. X/Elapse/ && state==1 { state=2; e=$3; print $0; next }
  86. X/CPU/ && state==2    { state=3; c=$3; print $0; next }
  87. X/Arith/ && state==3  { flag=1; print $0; next }
  88. X/Elapse/ && flag==1 && !/\(Actual/  { printf "%s (Actual: %.2f )\n",$0,$3-e; next }
  89. X/CPU/ && flag==1 && !/\(Actual/     { printf "%s (Actual: %.2f )\n",$0,$3-c; next }
  90. X             { flag=0; print $0 }
  91. X    ' $f > /tmp/Adj$$
  92. X    if cmp $f /tmp/Adj$$ >/dev/null
  93. X    then
  94. X        echo No changes made.
  95. X    else
  96. X        chmod u+w $f
  97. X        cp /tmp/Adj$$ $f
  98. X        chmod u-w $f
  99. X    fi
  100. X    rm -f /tmp/Adj$$
  101. Xdone
  102. End-of-File-Grunt
  103. if test 764 -ne `cat 'Adjust' | wc -c`
  104. then
  105.     echo 'shar: transmission error (expected 764 characters)'
  106. fi
  107. echo 'x - BSDtime.awk'
  108. if test -f 'BSDtime.awk'
  109. then
  110.     echo 'shar: over-writing existing file BSDtime.awk'
  111. fi
  112. sed 's/^X//' > BSDtime.awk <<'End-of-File-Grunt'
  113. X# $Header: BSDtime.awk,v 3.4 87/06/22 14:27:07 kjmcdonell Beta $
  114. X/real/    { if (!fail) {
  115. X        real+=$1; r2+=$1*$1; user+=$3; sys+=$5; c=$3+$5; c2+=c*c
  116. X        ok++
  117. X      }
  118. X          iter++; fail=0; next
  119. X    }
  120. X    { print "** Iteration ",iter+1," Failed: ",$0; fail=1 }
  121. XEND {
  122. X    if (fail) iter++
  123. X    if (ok != iter) {
  124. X        printf "For %d successful iterations from %d attempts ...\n",ok,iter
  125. X        iter=ok
  126. X    }
  127. X    if (iter > 0) {
  128. X        printf "Elapsed Time: %.2f seconds",real/iter
  129. X        if (iter > 1) printf " (variance %.3f)",(r2-2*real*real/iter+real*real/iter)/(iter-1)
  130. X        cpu=sys+user
  131. X        printf "\nCPU Time: %.2f seconds [ %.2fu + %.2fs ]",cpu/iter,user/iter,sys/iter
  132. X        if (iter > 1) printf " (variance %.3f)",(c2-2*cpu*cpu/iter+cpu*cpu/iter)/(iter-1)
  133. X        print
  134. X    } else {
  135. X        print "Elapsed Time: -- no measured results!!"
  136. X        print "CPU Time: -- no measured results!!"
  137. X    }
  138. X    }
  139. End-of-File-Grunt
  140. if test 867 -ne `cat 'BSDtime.awk' | wc -c`
  141. then
  142.     echo 'shar: transmission error (expected 867 characters)'
  143. fi
  144. echo 'x - Config'
  145. if test -f 'Config'
  146. then
  147.     echo 'shar: over-writing existing file Config'
  148. fi
  149. sed 's/^X//' > Config <<'End-of-File-Grunt'
  150. X#! /bin/sh
  151. X# $Header: Config,v 3.4 87/06/23 13:53:05 kjmcdonell Beta $
  152. X# sh script to extract useful configuration data
  153. Xif test $# -ne 1
  154. Xthen
  155. X    echo "Usage: Config logfile"
  156. X    exit 1
  157. Xfi
  158. Xtmp=/tmp/$$
  159. Xecho "MUSBUS - Site Configuration Data for $1"
  160. Xecho "" >>$tmp
  161. Xecho "Please answer the following questions ..."
  162. Xecho "CPU Make and Model Number?"
  163. Xread x
  164. Xecho "MC=\"$x\"" >>$tmp
  165. Xecho "Hardware options, e.g. floating point unit?"
  166. Xread x
  167. Xecho "OPT=\"$x\"" >>$tmp
  168. Xecho "Real Memory (M bytes)?"
  169. Xread x
  170. Xecho "MEM=\"$x\"" >>$tmp
  171. Xecho "Type of UNIX (Vendor name, AT&T System V, BSD 4.x, etc)?"
  172. Xread type
  173. Xecho "UNIX Version or Revision Level?"
  174. Xread version
  175. Xecho "UNIX=\"$type $version\"" >>$tmp
  176. Xecho "Disk Configuration (no. of spindles and their type(s))?"
  177. Xread x
  178. Xecho "DISKS=\"$x\"" >>$tmp
  179. Xcat $tmp $1 > ${tmp}a
  180. Xchmod u+w $1
  181. Xmv ${tmp}a $1
  182. Xchmod u-w $1
  183. Xrm -f ${tmp}*
  184. End-of-File-Grunt
  185. if test 853 -ne `cat 'Config' | wc -c`
  186. then
  187.     echo 'shar: transmission error (expected 853 characters)'
  188. fi
  189. echo 'x - Groan'
  190. if test -f 'Groan'
  191. then
  192.     echo 'shar: over-writing existing file Groan'
  193. fi
  194. sed 's/^X//' > Groan <<'End-of-File-Grunt'
  195. X#! /bin/sh
  196. X# $Header: Groan,v 3.4 86/12/24 08:56:45 kenj Beta $
  197. X# run MUSBUS multiuser test continuously
  198. Xrm -f nogroan
  199. Xn=1
  200. Xnusers="1 4 8 16 24 32 48 64"
  201. Xttys="/dev/ttyi11 /dev/ttyi34 /dev/ttyi03"
  202. Xdirs="/hon/Bench /tmp/Bench /u1/Bench"
  203. Xexport nusers ttys dirs
  204. Xfor t in $ttys
  205. Xdo
  206. X    stty 9600 -tabs -raw -nl >$t &
  207. Xdone
  208. Xfor d in $dirs
  209. Xdo
  210. X    if test -d $d
  211. X    then
  212. X        :
  213. X    else
  214. X        mkdir $d
  215. X        echo $d created.
  216. X    fi
  217. Xdone
  218. Xdate > log.groan
  219. Xwhile test ! -f nogroan
  220. Xdo
  221. X    ./run >> log.groan 2>&1
  222. X    echo "Groan: Major Iteration $n Completed" >> log.groan
  223. X    n=`expr $n + 1`
  224. Xdone
  225. End-of-File-Grunt
  226. if test 550 -ne `cat 'Groan' | wc -c`
  227. then
  228.     echo 'shar: transmission error (expected 550 characters)'
  229. fi
  230. echo 'x - Intro.nr'
  231. if test -f 'Intro.nr'
  232. then
  233.     echo 'shar: over-writing existing file Intro.nr'
  234. fi
  235. sed 's/^X//' > Intro.nr <<'End-of-File-Grunt'
  236. X.\" This needs NO macro package, it is self-contained
  237. X.\" $Header: Intro.nr,v 3.12 87/09/16 07:24:45 kenj Exp $
  238. X.nr Pw 6.75i
  239. X.nr Po 0i
  240. X.ll \n(Pwu
  241. X.ev 2
  242. X.ll \n(Pwu
  243. X.lt \n(Pwu
  244. X.ev
  245. X.po -\n(Po
  246. X.hy 14
  247. X.nr II 0
  248. X.de SZ
  249. X.ps \\$1
  250. X.vs \\$1u*1.25p
  251. X..
  252. X.de NH
  253. X.in 0
  254. X.if t .sp 0.5v
  255. X.if n .sp
  256. X.ne 6v
  257. X.SZ 12
  258. X.ft B
  259. X\\$1 \\$2
  260. X.br
  261. X.ft P
  262. X.SZ 10
  263. X..
  264. X.de LP
  265. X.in \\n(IIu
  266. X.if t .sp 0.35v
  267. X.if n .sp
  268. X.ne 3v
  269. X..
  270. X.de IP
  271. X.LP
  272. X.in +4n
  273. X.ta 4n
  274. X.ti -4n
  275. X\\$1    \\c
  276. X..
  277. X.de PR
  278. X\\fI\\$1\\fP\\$2
  279. X..
  280. X.de FL
  281. X\\fB\\$1\\fP\\$2
  282. X..
  283. X.de SC
  284. X.ti +6n
  285. X.if t .HS
  286. X$ \\$1
  287. X.br
  288. X.if t .HE
  289. X..
  290. X.de SV
  291. X\\fI$\\$1\\fP\\$2
  292. X..
  293. X.de RS
  294. X.in +6n
  295. X..
  296. X.de RE
  297. X.in -6n
  298. X..
  299. X.de HS
  300. X.ft H
  301. X.ps -1
  302. X..
  303. X.de HE
  304. X.ps +1
  305. X.ft R
  306. X..
  307. X.de VA
  308. X.IP "\fIShell Variable:\fP \\fB\\$1\\fP  (default: \\$2)"
  309. X.br
  310. X..
  311. X.de TN
  312. X.IP "\fITest Name:\fP \\fB\\$1\\fP"
  313. X.br
  314. X..
  315. X\&
  316. X.sp 1i
  317. X.de Fo
  318. X'Hd
  319. X..
  320. X.de Hd
  321. X.ev 2
  322. X.bp
  323. X.in 0
  324. X.sp
  325. X.tl 'MUSBUS Introduction''%.'
  326. X.sp
  327. X.ev
  328. X..
  329. X.wh -0.1i Fo
  330. X.ad c
  331. X.SZ 14
  332. X.ft B
  333. XAn Introduction to the Monash Benchmark Suite (MUSBUS)
  334. X.if t .sp 0.5v
  335. X.if n .sp
  336. X.SZ 12
  337. X.ft I
  338. XKen J. McDonell
  339. X.if t .sp 0.5v
  340. X.if n .sp
  341. X.SZ 10
  342. X.ft R
  343. XDepartment of Computer Science
  344. X.br
  345. XMonash University
  346. X.br
  347. XClayton, AUSTRALIA 3168
  348. X.sp
  349. XACSnet: kenj@moncskermit.oz
  350. X.br
  351. XUSENET: seismo!munnari!moncskermit.oz!kenj
  352. X.br
  353. XARPA: kenj%moncskermit.oz@seismo.arpa
  354. X.sp
  355. XRevised: 16 September, 1987
  356. X.br
  357. X.ad b
  358. X.NH 1 Introduction
  359. X.LP
  360. XThe Monash University Suite for Benchmarking
  361. XUNIX\v'-.5n'\(dg\v'+.5n'
  362. X.de DF
  363. X'FN
  364. X.rm DF
  365. X..
  366. X.wh -0.7i DF
  367. X.de FN
  368. X.ev 2
  369. X.in 0
  370. X.sp
  371. X\\l'1.5i\(ul'
  372. X.sp 0.5v
  373. X\v'-.5n'\(dg\v'+.5n' UNIX is a trademark of AT&T
  374. X.sp 2
  375. X.ev
  376. X.rm FN
  377. X.ch DF -0.01i
  378. X..
  379. XSystems (MUSBUS), has been developed
  380. Xto assist in
  381. X.IP (a)
  382. Xidentifying bottlenecks and performance problems in new
  383. XUNIX ports, and
  384. X.IP (b)
  385. Xproviding a robust test environment in which
  386. Xthe performance of competing
  387. XUNIX systems may be compared.
  388. X.LP
  389. XThis document provides an overview for \fBVersion\fP \fB5.0\fP of MUSBUS
  390. Xand is intended for knowledgeable programmers trying to run
  391. Xthe software on their own hardware.
  392. X.NH 2 Preliminaries
  393. X.NH 2.1 "Software Environment"
  394. X.LP
  395. XYou will require a system that supports Level 7, System V
  396. Xor BSD
  397. Xcompatibility, along with the following programs.
  398. X.RS
  399. X.PR sh
  400. X(the Bourne shell)
  401. X.br
  402. X.PR awk
  403. X.PR cat
  404. X.PR cc
  405. X.PR chmod
  406. X.PR comm
  407. X.PR cp
  408. X.PR date
  409. X.PR dc
  410. X.PR df
  411. X.PR echo
  412. X.PR ed
  413. X.PR expr
  414. X.PR kill
  415. X.PR ls
  416. X.PR make
  417. X.PR mkdir
  418. X.PR rm
  419. X.PR sed
  420. X.PR test
  421. X.PR time
  422. X.PR touch
  423. X.PR tty
  424. X.PR who
  425. X.RE
  426. X.NH 2.2 "Getting Started"
  427. X.LP
  428. XAll the files are distributed in a single directory.
  429. XOnce these have been retrieved from the distribution some initial housekeeping
  430. Xand system specifics have to be sorted out.
  431. X.LP
  432. XWhen fully installed, MUSBUS contains files in several subdirectories
  433. Xas follows,
  434. X.IP \(bu
  435. X.FL Results ,
  436. Xlog files created by the command procedure
  437. X.PR run .
  438. X.IP \(bu
  439. X.FL Tmp ,
  440. Xtemporary files created by
  441. X.PR run
  442. Xand friends.
  443. X.IP \(bu
  444. X.FL Tools ,
  445. Xpost processors to produce
  446. X.PR tbl
  447. Xinput from the log files.
  448. X.IP \(bu
  449. X.FL Workload ,
  450. Xdescriptions of the workload profile, all associated data files and some
  451. Xwork script manipulation tools.
  452. X.LP
  453. XTo explicitly
  454. Xcreate these directories and distribute the required files into the
  455. Xappropriate places you may
  456. X.SC "make install"
  457. Xhowever this will be done automatically by
  458. X.PR run
  459. Xas required.
  460. X.LP
  461. XThe file 
  462. X.FL time.awk
  463. Xis used by the command procedure
  464. X.PR run
  465. Xto average the
  466. Xresults from several attempts to time a particular test and so
  467. Xdepends upon the format of output from
  468. X.PR /bin/time .
  469. XThe results from multiple timing attempts are held temporarily
  470. Xin the file 
  471. X.FL Tmp/tmp.$$
  472. X(where $$ is the pid of the
  473. X.PR run
  474. Xshell).
  475. XTry
  476. X.SC "/bin/time date"
  477. Xand check the output from
  478. X.PR /bin/time .
  479. XIf it has a format like
  480. X.ti +4n
  481. X0.4 real         0.0 user         0.1 sys  
  482. X.br
  483. Xthen
  484. X.SC "rm -f time.awk"
  485. X.SC "ln BSDtime.awk time.awk"
  486. X.LP
  487. XIf the
  488. X.PR /bin/time
  489. Xoutput looks like
  490. X.RS
  491. X.ta 8n
  492. X.nf
  493. Xreal    0:00.4
  494. Xuser    0:00.0
  495. Xsys    0:00.1
  496. X.fi
  497. X.RE
  498. Xthen
  499. X.SC "rm -f time.awk"
  500. X.SC "ln SysVtime.awk time.awk"
  501. X.LP
  502. XOtherwise create your own version of
  503. X.FL time.awk
  504. Xusing
  505. X.FL *time.awk
  506. Xas examples.
  507. X.LP
  508. XSome of the tests require system calls from the C code to measure
  509. Xsmall elapsed times.
  510. XThis is a real problem since there appears to be no 
  511. Xuniversally correct way of doing this in the Unix
  512. Xworld.
  513. XThe particular source files are
  514. X.FL clock.c ,
  515. X.FL fstime.c
  516. Xand
  517. X.FL mem.c .
  518. XIn the
  519. X.FL Makefile ,
  520. Xensure that you have \fBone\fP of the following
  521. Xdefinitions included in the CFLAGS (in addition to the \(miO).
  522. X.RS
  523. X.ta 12n
  524. X.nf
  525. X.if t \fH\s-1\(miDSysV\s+1\fR    you are using a System V brand of Unix
  526. X.if n \(miDSysV    you are using a System V brand of Unix
  527. X.if t \fH\s-1\(miDBSD4v2\s+1\fR    you are using a Berkeley 4.2 or 4.3 system
  528. X.if n \(miDBSD4v2    you are using a Berkeley 4.2 or 4.3 system
  529. X.if t \fH\s-1\(miDBSD4v1\s+1\fR    you are using a Berkeley 4.1 system
  530. X.if n \(miDBSD4v1    you are using a Berkeley 4.1 system
  531. X.fi
  532. X.RE
  533. XFor example,
  534. X.ti +6n
  535. X.if t \fH\s-1CFLAGS = \(miO \(miDBSD4v2\s+1\fR
  536. X.if n CFLAGS = -O -DBSD4v2
  537. X.LP
  538. XIf \fBnone\fP of these systems
  539. Xis appropriate, the source files \fIwill not compile\fP
  540. Xand you will have to decide on appropriate alternative calls
  541. Xand coding to suit local conditions.
  542. X.LP
  543. XIf you don't have the public-domain random number generator \fIrandom\fP()
  544. Xremove the #defines for \fBrand\fP and \fBsrand\fP in
  545. X.FL mkperm.c.
  546. X.LP
  547. XCheck the
  548. X.FL HISTORY
  549. Xfile (if it exists) for notification of any changes, additions
  550. Xor problems that may have been made or fixed subsequent to the version
  551. Xof MUSBUS described in this document.
  552. X.LP
  553. XTry
  554. X.SC "make programs"
  555. Xto confirm that every necessary program can be compiled and
  556. Xloaded correctly.
  557. X.LP
  558. XNow attempt to run all the tests once (this takes roughly 20 minutes).
  559. XUsing the Bourne shell (\c
  560. X.PR /bin/sh ),
  561. X.SC "iterations=1"
  562. X.SC "nusers=1"
  563. X.SC "export iterations nusers"
  564. X.SC "./run"
  565. X.LP
  566. XThis should demonstrate
  567. Xthat all the 
  568. X.PR sh,
  569. X.PR awk,
  570. X.PR sed
  571. Xand 
  572. X.PR ed
  573. Xscripts
  574. Xcan be made to work.
  575. XVerification of the health of things to this point depends upon
  576. Xchecking the output from
  577. X.PR run
  578. Xto ensure that no nasty errors
  579. Xare reported, and in particular scrolling through the file
  580. X.FL Results/log .
  581. XEvery time
  582. X.PR run
  583. Xis used information is \f3appended\fP to
  584. X.FL Results/log
  585. Xand
  586. X.FL Results/log.work ,
  587. Xso make sure that these files are removed or renamed before you start
  588. Xto do anything serious.
  589. XThe contents of
  590. X.FL Results/log
  591. Xshould look something like
  592. X.LP
  593. X.RS
  594. X.nf
  595. X.HS
  596. XStart Benchmark Run (MUSBUS Version X.Y)
  597. X  Tue Jun 23 17:18:21 EDT 1987 (long iterations 6 times)
  598. X  2 interactive users.
  599. X
  600. XArithmetic Test (type = arithoh): 1000 Iterations
  601. XElapsed Time: 0.44 seconds (variance 0.003)
  602. XCPU Time: 0.30 seconds [ 0.30u + 0.00s ] (variance 0.000)
  603. X
  604. XArithmetic Test (type = register): 1000 Iterations
  605. XElapsed Time: 3.36 seconds (variance 0.008)
  606. XCPU Time: 3.18 seconds [ 3.13u + 0.05s ] (variance 0.008)
  607. X
  608. X[ ... and lots more similar goodies ]
  609. X
  610. XOutput sent to ... /dev/ttyp0
  611. XDirectories for temporary files ... Tmp
  612. X
  613. X.nf
  614. X.ta 14n,+8n,+8n,+8n,+8n
  615. XFilesystem    kbytes    used    avail capacity    Mounted on
  616. X/dev/hp0a    \07419    \06202    \0\0475    93%    /
  617. X/dev/hp0g    38383    33296    \01248    96%    /usr
  618. X/dev/hp1a    \07419    \04169    \02508    62%    /jnk
  619. X/dev/hp1b    15583    \03181    10843    23%    /usr/spool
  620. X/dev/hp1g    38383    32579    \01965    94%    /mnt
  621. X/dev/up1a    \07471    \0\0\010    6713    \00%    /tmp
  622. X
  623. XSIGALRM check:  12 x 5 sec delays takes 60.05 wallclock secs (error -0.08%)
  624. XSimulated Multi-user Work Load Test:
  625. X
  626. X1 Concurrent Users, each with Input Keyboard Rate 2 chars / sec
  627. XElapsed Time: 425.83 seconds (variance 0.125)
  628. XCPU Time: 27.20 seconds [ 17.30u + 9.90s ] (variance 0.013)
  629. X
  630. X  1 interactive users.
  631. XEnd Benchmark Run (Wed Jun 24 09:33:55 EDT 1987) ....
  632. X.HE
  633. X.fi
  634. X.RE
  635. X.LP
  636. XBeware of lines with the following formats, they indicate something
  637. Xis \fBwrong\fP.
  638. X.if t .IP "\fH\s-1** Iteration x Failed: text\fR\s+1"
  639. X.if n .IP "** Iteration x Failed: text"
  640. X.br
  641. XSomething (\fItext\fP) other than the normally anticipated output from 
  642. X.PR /bin/time
  643. Xwas found in the file
  644. X.FL Tmp/tmp.$$ .
  645. X.if t .IP "\fH\s-1Elapsed Time: -- no measured results!!\fR\s+1";
  646. X.if n .IP "Elapsed Time: -- no measured results!!";
  647. X.br
  648. XNot a single valid timing result was found in
  649. X.FL Tmp/tmp.$$ .
  650. X.if t .IP "\fH\s-1Terminated during iteration n\fR\s+1"
  651. X.if n .IP "Terminated during iteration n"
  652. X.br
  653. XPremature termination of a test, usually as the result of
  654. Xa shell trap taken from
  655. X.PR run .
  656. XMost often this is symptomatic of an earlier
  657. Xerror reported in
  658. X.FL Results/log .
  659. X.if t .IP "\fH\s-1* Apparent errors from makework ... *\fR\s+1"
  660. X.if n .IP "* Apparent errors from makework ... *"
  661. X.br
  662. XAfter cleaning the log files from the multi-user test (using 
  663. X.PR sed
  664. Xand the script
  665. X.FL check.sed )
  666. Xsome lines remained that probably indicate
  667. Xreal errors which forced the multi-user test to
  668. Xterminate prematurely.
  669. XDepending upon the formats of messages from programs (especially
  670. Xin the multi-user workload),
  671. X.FL check.sed
  672. Xmay need some local fine tuning to remove lines,
  673. Xthat do not reflect genuine error conditions, from
  674. Xthe log files.
  675. XIf this is not done,
  676. Xthe tests will be aborted prematurely based upon the classification
  677. Xof a spurious message as a real error condition.
  678. X.if t .IP "\fH\s-1Reason?: text\fR\s+1"
  679. X.if n .IP "Reason?: text"
  680. X.br
  681. X.PR Makework
  682. X(the controlling program for the multi-user test)
  683. Xhas detected an inconsistency and taken a fatal dive,
  684. X\fItext\fP comes from
  685. X.PR perror ()
  686. Xand the previous line in
  687. X.FL Results/log
  688. Xwill contain 
  689. X.PR makework "'s"
  690. Xidea of what is wrong.
  691. X.if t .IP "\fH\s-1* Benchmark Aborted .... *\fR\s+1"
  692. X.if n .IP "* Benchmark Aborted .... *"
  693. X.br
  694. XJust what it says!
  695. X.LP
  696. XOther possible error reports in
  697. X.FL Results/log
  698. Xrelate to specific tests
  699. Xand are either self explanatory (e.g. missing or illegal program
  700. Xoptions) or described in the Sections below.
  701. X.LP
  702. XThe file
  703. X.FL Results/log.work
  704. Xcontains detailed logging of the multi-user test, and may contain
  705. Xuseful information in the event that this test fails or terminates
  706. Xprematurely.
  707. XBesides logging process ids and file descriptor assignments for each
  708. Xsimulated user's job stream, standard error output is trapped and
  709. Xreported in
  710. X.FL Results/log.work .
  711. X.NH 3 "The Tests"
  712. X.LP
  713. XIf you are serious about the results produced, these tests should
  714. Xbe run on a dedicated system without concurrent activity.
  715. XWhen possible, an idle system in mult-iuser mode is
  716. Xpreferable to a single user system.
  717. X.LP
  718. XAll the tests are controlled by shell variables used within the command
  719. Xprocedure
  720. X.PR run .
  721. XBy setting environment variables of the same name, the default values
  722. Xof the shell variables
  723. Xmay be over-ridden, however if the defaults are consistently wrong for
  724. Xparticular variables it is safer (i.e. less error prone) to modify
  725. Xthe defaults in
  726. X.PR run .
  727. X.LP
  728. X.PR Run
  729. Xdoes its work for the most part silently, logging information to
  730. Xcertain files, and providing a terse summary of the particular test(s)
  731. Xbeing run on the tty from which
  732. X.PR run
  733. Xwas invoked.
  734. X.LP
  735. XA designated test may by run using the command
  736. X.SC "./run thing"
  737. Xwhere \fIthing\fP is one of the test names described in the following
  738. XSections.
  739. XThe commands
  740. X.SC "./run"
  741. Xor
  742. X.SC "./run all"
  743. Xwill run everything.
  744. X.LP
  745. X.PR Run
  746. Xmay be interrupted from the keyboard (SIGINT)
  747. Xif it is started in foreground
  748. Xand after some fooling about it manages to shut things down and clean up files.
  749. X.PR run
  750. Xcreates a 
  751. X.PR sh
  752. Xcommand procedure
  753. X.FL Tmp/kill_run
  754. Xthat may be used to shut down a background
  755. X.PR run
  756. Xvia
  757. X.SC "Tmp/kill_run"
  758. X.VA iterations 6
  759. XUnless otherwise stated,
  760. Xthis variable controls the number of times each test is repeated for timing.
  761. XAt the beginning of each iteration, the program
  762. X.FL iamalive
  763. Xwrites the iteration
  764. Xnumber (without newline or carriage return)
  765. Xon standard output.
  766. X.NH 3.1 "Raw Speed Measures"
  767. X.NH 3.1.1 "Specific Arithmetic"
  768. X.LP
  769. XThis family of tests computes the sum of a series of terms
  770. Xsuch that the arithmetic is unbiased towards operator type
  771. X(i.e. equal numbers of additions, subtractions, multiplications
  772. Xand divisions).
  773. XEach major loop in the computation involves summing 100 terms
  774. Xof the series.
  775. X.VA arithloop 1000
  776. XNumber of major loops in the computation.
  777. X.TN arithoh
  778. XDo not compute the series, so measures the overhead in the
  779. Xcomputation.
  780. X.TN register
  781. XArithmetic uses registers.
  782. X.TN short
  783. XArithmetic uses shorts.
  784. X.TN int
  785. XArithmetic uses ints.
  786. X.TN long
  787. XArithmetic uses longs.
  788. X.TN float
  789. XArithmetic uses floats.
  790. X.TN double
  791. XArithmetic uses doubles.
  792. X.LP
  793. XAfter all the arithmetic tests have been performed, the 
  794. X.PR sh
  795. Xscript
  796. X.FL Tools/Adjust
  797. Xshould be used with
  798. X.FL Results/log ,
  799. Xi.e.
  800. X.SC "./Tools/Adjust Results/log"
  801. Xto compute the \fBactual\fP
  802. XCPU and elapsed times when the overhead measured by the test
  803. X.PR arithoh
  804. Xis subtracted.
  805. XIt is these times (i.e. \fIminus the startup and loop overhead\fP)
  806. Xthat have been published and circulated amongst MUSBUS users.
  807. XFailure to run the 
  808. X.PR Tools/Adjust
  809. Xscript will make the machine
  810. Xyou are testing look comparatively worse
  811. Xthan it really is!
  812. XNote that
  813. X.PR Tools/Adjust
  814. Xwill be run automatically by the log file postprocessors (\c
  815. X.PR Tools/mktbl
  816. Xand
  817. X.PR Tools/mkcomp )
  818. Xif the times have not already been adjusted.
  819. XOnce the adjustment has been made, the relevant portion of
  820. X.FL Results/log
  821. Xshould look something like (note \fBActual\fP times in parentheses),
  822. X.LP
  823. X.RS
  824. X.nf
  825. X.HS
  826. XStart Benchmark Run (MUSBUS Version X.Y)
  827. X  Tue Jun 23 17:18:21 EDT 1987 (long iterations 6 times)
  828. X  2 interactive users.
  829. X
  830. XArithmetic Test (type = arithoh): 1000 Iterations
  831. XElapsed Time: 0.44 seconds (variance 0.003)
  832. XCPU Time: 0.30 seconds [ 0.30u + 0.00s ] (variance 0.000)
  833. X
  834. XArithmetic Test (type = register): 1000 Iterations
  835. XElapsed Time: 3.36 seconds (variance 0.008) (Actual: 2.92 )
  836. XCPU Time: 3.18 seconds [ 3.13u + 0.05s ] (variance 0.008) (Actual: 2.88 )
  837. X
  838. X[ ... and lots more similar goodies ]
  839. X
  840. X.HE
  841. X.fi
  842. X.RE
  843. X.NH 3.1.2 "General Purpose Arithmetic"
  844. X.TN dc
  845. XCompute the square root of 2 to 99 decimal places using 
  846. X.PR dc .
  847. XThe 
  848. X.PR dc
  849. Xinput is in
  850. X.FL dc.dat .
  851. XThis test is due to John Lions (University of New South Wales) who
  852. Xhas suggested it as a good first order measure of raw system speed.
  853. X.NH 3.1.3 Recursion
  854. X.VA ndisk 17
  855. X.TN hanoi
  856. XA recursive solution to the classical Tower of Hanoi problem.
  857. XWork increases as 2**(number of disks).
  858. X.SV ndisk
  859. Xprovides a \fIlist\fP of the number of disks for a
  860. X\fBset\fP of problems, however the default setting is for a singular
  861. Xset.
  862. X.NH 3.1.4 "System Calls, Pipes, Forks, Execs and Context Switches"
  863. X.VA ncall 4000
  864. X.TN syscall
  865. XSit in a hard loop of
  866. X.SV ncall
  867. Xiterations, making 5 system calls
  868. Xper iteration.
  869. XThe system calls (\c
  870. X.PR dup (0),
  871. X.PR close (i),
  872. X.PR getpid (),
  873. X.PR getuid ()
  874. Xand
  875. X.PR umask (i))
  876. Xinvolve little work on the part of the UNIX kernel, so
  877. Xthe test predominantly measures the overhead associated with
  878. Xthe system call mechanism.
  879. X.VA io 2048
  880. X.TN pipe
  881. XOne process (therefore no context switching) that writes and reads
  882. Xa 512 byte block along a pipe
  883. X.SV io
  884. Xtimes.
  885. X.VA children 100
  886. X.TN spawn
  887. XSimply repeat
  888. X.SV children
  889. Xtimes; fork a copy of yourself and wait for
  890. Xthe child process to exit (which it should do immediately).
  891. X.VA nexecl 100
  892. X.TN execl
  893. XPerform
  894. X.SV nexecl
  895. Xexecs using 
  896. X.PR execl ().
  897. XThe program to be exec'd has been artificially expanded to a reasonable
  898. Xsize (on a VAX, 11264 text + 2048 data + 24388 bss).
  899. X.VA switch1 500
  900. X.TN context1
  901. XPerform 2 x
  902. X.SV switch1
  903. Xcontext switches, using pipes for synchronization.
  904. XThe test involves 2 processes connected via 2 pipes.
  905. XOne process writes then reads a 4-byte (descending) sequence number, while
  906. Xthe other process reads then writes a sequence number.
  907. XSynchronization is validated at each swap by checking the values of the
  908. Xsequence numbers read and written.
  909. X.NH 3.1.5 "C Compilation and Loading"
  910. X.TN C
  911. XMeasure the time for each of
  912. X.SC "cc -c cctest.c"
  913. X.SC "cc cctest.o"
  914. Xwhere 
  915. X.FL cctest.c
  916. Xcontains 124 lines of uninteresting C code (108
  917. Xlines of real code after 
  918. X.PR cpp ).
  919. X.NH 3.1.6 "Memory Access Speed"
  920. X.LP
  921. XThese tests try to measure read accesses per real second into an array
  922. Xof integers.
  923. XBecause of inaccuracies in measuring small real times, the
  924. Xresults of this test are subject to large variances and
  925. Xcan not be interpreted with great confidence (e.g. negative
  926. Xand infinite speeds have been observed).
  927. XConsequently, these tests are best considered as a
  928. Xhistorical curiosities from the days when MMUs were bottlenecks on
  929. Xmicroporcessor-based systems, and \fBno\fP real significance should
  930. Xbe attached to the observed times.
  931. X.VA poke 100000
  932. XNumber of array accesses.
  933. X.VA arrays "8 64 512"
  934. XList of array sizes in units of 1024 ints.
  935. X.TN seqmem
  936. XCyclic sequential access pattern, hitting each element of the array
  937. Xin turn.
  938. X.TN randmem
  939. XRandom access patterns -- to give VM systems a chance to do something
  940. Xbetter!
  941. X.NH 3.1.7 "Filesystem Throughput"
  942. X.VA blocks "62 125 250 500"
  943. XA list of file sizes in Kbytes.
  944. X.VA where .
  945. XThe directory in which the files will be created.
  946. XThis test requires at least
  947. X2 x max(\c
  948. X.SV blocks )
  949. XKbytes of free space in the filesystem
  950. Xcontaining
  951. X.SV where .
  952. X.TN fstime
  953. XThis program attempts to measure file write time, file read time and
  954. Xfile copy time.
  955. XIt is assumed that BUFSIZ as defined in <stdio.h> is a good size for
  956. Xphysical i/o, and all i/o is done via direct calls to 
  957. X.PR read ()
  958. Xand 
  959. X.PR write ().
  960. XThis test is performed (\c
  961. X.SV iterations /2)
  962. Xtimes.
  963. X.LP
  964. XBeware of the \fIwrite\fP time, since this can be influenced by the size
  965. Xof the disk block cache in the kernel.
  966. XBefore the reads are commenced there are a couple of 
  967. X.PR sync ()s
  968. Xand a 5 second sleep to try and flush the cache.
  969. XThe times for small files are most sensitive to disk block
  970. Xcaching.
  971. X.LP
  972. XReally the \fIcopy\fP time for the largest file
  973. Xis the best indicator of throughput and reflects
  974. Xthe type of disk activity most commonly generated by compilers, editors,
  975. Xassemblers, etc.
  976. XAlso the rates are measured against elapsed time, so there is some
  977. Xscope for variance however the absolute times are usually long enough
  978. Xto make this effect insignificant \fBprovided\fP
  979. Xthere is no concurrent disk activity on the same spindle!
  980. X.NH 3.2 "Emulated Multi-user Test"
  981. X.VA nusers "1 4 8 16 24 32"
  982. XA list of the number users to be emulated.
  983. X.VA ttys /dev/tty
  984. XA \fBlist\fP of tty devices
  985. Xwhere the simulated tty output is sent -- there is a lot of this, and
  986. Xyou should ensure that these tty lines are operating at the normal
  987. Xbaud rate (e.g. 9600) for the test system.
  988. XIf your CPU console does not use a standard serial multiplexer
  989. X(e.g. a VAX, Pyramid, Gould, DG, etc.), then the tty output
  990. Xshould be directed to \fIsome other\fP tty line(s) that \fBdo\fP use the
  991. Xordinary serial port hardware.
  992. X.VA dirs Tmp
  993. XA \fBlist\fP of directories that will be used to create subdirectories
  994. Xand temporary files to run the
  995. Xuser job streams from.
  996. X.VA rate 2
  997. XUsers are assumed to type at a rate of
  998. X.SV rate
  999. Xcharacters per second.
  1000. X.TN work
  1001. XOf all the tests in MUSBUS,
  1002. Xthis is the by far the most complicated, most realistic and most likely
  1003. Xto fail.
  1004. XThis test is performed (\c
  1005. X.SV iterations /2)
  1006. Xtimes.
  1007. X.LP
  1008. XThe synthetic workload is created from a number of job streams, each
  1009. Xof which is described by a line in the file
  1010. X.FL Tmp/workload .
  1011. XEach line consists of
  1012. X.IP \(bu
  1013. Xthe home directory for the job stream,
  1014. X.IP \(bu
  1015. Xthe full pathname of the program to run,
  1016. X.IP \(bu
  1017. Xoptional arguments to that program,
  1018. X.IP \(bu
  1019. Xan optional source
  1020. Xof standard input to that program (a filename prefixed by ``<''), and
  1021. X.IP \(bu
  1022. Xan optional destination
  1023. Xfor standard output from that program (a filename prefixed by ``>'').
  1024. X.LP
  1025. X.FL Tmp/workload
  1026. Xis created automatically by the command script
  1027. X.PR run
  1028. Xbased upon
  1029. X.IP (a)
  1030. Xthe variables
  1031. X.SV dirs
  1032. Xand
  1033. X.SV ttys , and
  1034. X.IP (b)
  1035. Xthe workload profile
  1036. X.FL Workload/script.master
  1037. Xfrom which the script interpreter program name is extracted
  1038. Xand the individual input script files (\c
  1039. X.FL Tmp/script.? ).
  1040. X.LP
  1041. XWhen
  1042. X.FL Tmp/workload
  1043. Xis constructed, a cyclic scheme
  1044. Xis used to share user work amongst the
  1045. Xavailable directories and tty lines (as per
  1046. X.SV dirs
  1047. Xand
  1048. X.SV ttys ).
  1049. XIn this way, serial i/o bottlenecks for large numbers of simulated
  1050. Xusers, and unbalanced disk i/o across spindles may be avoided.
  1051. XAs a dynamic check, the program
  1052. X.PR ttychk
  1053. Xis used within
  1054. X.PR run
  1055. Xto check for potential bandwidth limitations on the serial i/o
  1056. Xlines, given the number of lines and the maximum number of job streams.
  1057. X.LP
  1058. XThe workload profile (\c
  1059. X.FL Workload/script.master )
  1060. Xhas the following format.
  1061. X.IP 1.
  1062. XThe first line must begin ``%W%'' followed by the full pathname of the
  1063. Xrelevant interpreter and any required options.
  1064. XFor example, if the script should be run by the Bourne shell, an
  1065. Xappropriate specification would be
  1066. X.RS
  1067. X.HS
  1068. X%W% /bin/sh -ie
  1069. X.HE
  1070. X.RE
  1071. X.IP 2.
  1072. XAll subsequent lines up to the first line beginning with ``%%''
  1073. Xare preamble commands that must appear at the \f3beginning\fP of \f3every\fP
  1074. Xscript.
  1075. X.IP 3.
  1076. XSequences of commands terminated by a line beginning with ``%%''
  1077. Xconstitute a job step.
  1078. XEach job step is an autonomous piece of work such that once the
  1079. Xpreamble has been executed, job steps may be executed in \f3any\fP order.
  1080. X.IP 4.
  1081. XAny lines following the last ``%%'' line form a postscript
  1082. Xthat must appear at the \f3end\fP of \f3every\fP
  1083. Xscript.
  1084. X.LP
  1085. XThe command procedure
  1086. X.PR mkscript
  1087. Xand the program
  1088. X.PR mkperm
  1089. Xare used (by
  1090. X.PR run )
  1091. Xto create several (usually 4) scripts from
  1092. X.FL Workload/script/master
  1093. Xwith random permutations
  1094. Xof the job steps.
  1095. XThese scripts reside in
  1096. X.FL Tmp/script.?
  1097. Xand are assigned in a cyclic manner to create the job streams.
  1098. XThe work for \fBeach\fP
  1099. Xsimulated user is generated from
  1100. X\fBone\fP job stream.
  1101. X.LP
  1102. XFor example the distributed 
  1103. X.FL Workload/script.master
  1104. Xis
  1105. X.LP
  1106. X.RS
  1107. X.nf
  1108. X.if t .HS
  1109. X.CK Workload/script.master
  1110. X%W% /bin/sh -ie
  1111. Xmkdir /tmp/$$ tmp
  1112. X%% 1 edit
  1113. X\&./keyb edscr1.dat | ed edit.dat
  1114. X: .......................................................
  1115. X: .    This is some filler of about the same            .
  1116. X: .    size as the file edscr1.dat, since the           .
  1117. X: .    emulated input proceeds in parallel, and         .
  1118. X: .    we want the real-time delay to be about right    .
  1119. X: .......................................................
  1120. Xchmod u+w temporary
  1121. Xrm temporary
  1122. X%% 2 ls
  1123. Xls -l
  1124. X%% 3 cat
  1125. Xcat cat.dat
  1126. X%% 4 compile
  1127. Xcc -c cctest.c 1>&2
  1128. Xrm *.o
  1129. X%% 5 edit, compile and link
  1130. Xchmod 444 dummy.c
  1131. X\&./keyb edscr2.dat | ed dummy.c
  1132. X: .  more textual and time filler for the second edscript file, edscr2.dat .
  1133. Xcc dummy.c 1>&2
  1134. Xrm a.* grunt.c
  1135. X%% 6 grep
  1136. Xgrep '[     ]*nwork' grep.dat
  1137. X%% 7 file copying
  1138. Xcp *.c edit.dat /tmp/$$
  1139. Xcp /tmp/$$/* tmp
  1140. X%%
  1141. Xrm -rf tmp /tmp/$$
  1142. X.if t .HE
  1143. X.fi
  1144. X.RE
  1145. X.LP
  1146. XThis generates several job streams one of which (\c
  1147. X.FL Tmp/script.1 )
  1148. Xcontains,
  1149. X.LP
  1150. X.RS
  1151. X.nf
  1152. X.if t .HS
  1153. X.CK Tmp/script.1
  1154. Xmkdir /tmp/$$ tmp
  1155. Xcc -c cctest.c 1>&2
  1156. Xrm *.o
  1157. X\&./keyb edscr1.dat | ed edit.dat
  1158. X: .......................................................
  1159. X: .    This is some filler of about the same            .
  1160. X: .    size as the file edscr1.dat, since the           .
  1161. X: .    emulated input proceeds in parallel, and         .
  1162. X: .    we want the real-time delay to be about right    .
  1163. X: .......................................................
  1164. Xchmod u+w temporary
  1165. Xrm temporary
  1166. Xcat cat.dat
  1167. Xgrep '[     ]*nwork' grep.dat
  1168. Xchmod 444 dummy.c
  1169. X\&./keyb edscr2.dat | ed dummy.c
  1170. X: .  more textual and time filler for the second edscript file, edscr2.dat .
  1171. Xcc dummy.c 1>&2
  1172. Xrm a.* grunt.c
  1173. Xcp *.c edit.dat /tmp/$$
  1174. Xcp /tmp/$$/* tmp
  1175. Xls -l
  1176. Xrm -rf tmp /tmp/$$
  1177. X.if t .HE
  1178. X.fi
  1179. X.RE
  1180. X.LP
  1181. XGiven the following environment variable assignments,
  1182. X.RS
  1183. X.nf
  1184. Xnusers=8
  1185. Xttys=/dev/ttyh0 /dev/ttyh8 /dev/ttyha
  1186. Xdirs=Tmp /usr/tmp
  1187. X.fi
  1188. X.RE
  1189. Xthe created workload description file (\c
  1190. X.FL Tmp/workload )
  1191. Xcontains
  1192. X.LP
  1193. X.RS
  1194. X.nf
  1195. X.if t .HS
  1196. XTmp/user1 /bin/sh -ie <Tmp/script.1 >/dev/ttyh0
  1197. X/usr/tmp/user2 /bin/sh -ie <Tmp/script.2 >/dev/ttyh8
  1198. XTmp/user3 /bin/sh -ie <Tmp/script.3 >/dev/ttyha
  1199. X/usr/tmp/user4 /bin/sh -ie <Tmp/script.4 >/dev/ttyh0
  1200. XTmp/user5 /bin/sh -ie <Tmp/script.1 >/dev/ttyh8
  1201. X/usr/tmp/user6 /bin/sh -ie <Tmp/script.2 >/dev/ttyha
  1202. XTmp/user7 /bin/sh -ie <Tmp/script.3 >/dev/ttyh0
  1203. X/usr/tmp/user8 /bin/sh -ie <Tmp/script.4 >/dev/ttyh8
  1204. X.if t .HE
  1205. X.fi
  1206. X.RE
  1207. X.LP
  1208. XIt is strongly recommended that you create your own workload
  1209. Xprofile for the multi-user test to reflect the anticipated
  1210. Xsystem usage.
  1211. XTo do this,
  1212. X.IP 1.
  1213. XUse the distributed files in the
  1214. X.FL Workload
  1215. Xdirectory as a guide.
  1216. X.IP 2.
  1217. XCreate a new
  1218. X.FL Workload/script.master
  1219. Xdescribing the required job steps.
  1220. X.IP 3.
  1221. XEnsure all required data files are in the
  1222. X.FL Workload
  1223. Xdirectory, because every job stream executes with the current
  1224. Xdirectory containing its own private copies of \f3all\fP the
  1225. Xfiles from
  1226. X.FL Workload .
  1227. X.IP 4.
  1228. XEnsure the makefile (\c
  1229. X.FL Workload/Makefile )
  1230. Xhas the following targets defined (they are assumed to exist by
  1231. X.PR run ).
  1232. X.RS
  1233. X.nr II 6n
  1234. X.IP (a)
  1235. Xcontext : ensure all files needed to run a script are present.
  1236. X.IP (b)
  1237. Xclean : remove any unnecessary temporary files, e.g. those created from
  1238. Xsomewhere else during a ``make context''.
  1239. X.IP (c)
  1240. Xscript.out : run a script and trap all the output; the file
  1241. X.FL script.out
  1242. Xshould contain the concatenation of the script input and the
  1243. Xscript output.
  1244. XThis file is used by
  1245. X.PR ttychk
  1246. Xto compute the output tty bandwidth requirements.
  1247. X.RE
  1248. X.nr II 0
  1249. X.LP
  1250. XThe program
  1251. X.PR makework
  1252. Xreads the
  1253. X.FL Tmp/workload
  1254. Xfile and builds data structures
  1255. Xfor each job stream (i.e. each simulated user) describing the home
  1256. Xdirectory, command interpreter and its options and standard input and
  1257. Xstandard output assignments.
  1258. XThereafter
  1259. X.PR makework
  1260. Xstarts the user program(s) (\c
  1261. X.PR /bin/sh
  1262. Xabove) and pumps
  1263. Xrandom chunks of input to them down pipes
  1264. Xso that the aggregate rate across all simulated users does not exceed
  1265. X.SV rate
  1266. X\(mu
  1267. X.SV nusers
  1268. Xcharacters per second.
  1269. X.LP
  1270. XBecause of process creation limits, this test
  1271. X\fBmust be run as root\fP.
  1272. X.LP
  1273. XBecause of open file limits,
  1274. X.PR makework
  1275. Xwill create \fIclones\fP of itself if
  1276. Xthere are too many users for it to simulate alone.
  1277. X.LP
  1278. XIf the standard input files to the job streams invoke interactive
  1279. Xprograms (e.g. \c
  1280. X.PR ed ),
  1281. Xthen substantial care must be taken that the data
  1282. Xpumped down the pipe by
  1283. X.PR makework
  1284. Xends up at the correct destination.
  1285. XThis has been the cause of some catastrophic problems in which only
  1286. Xparts of the job streams have been run by 
  1287. X.PR /bin/sh
  1288. Xand the rest has
  1289. Xbeen sucked up and thrown away by 
  1290. X.PR /bin/ed .
  1291. X.LP
  1292. XTo try and avoid these problems, the program
  1293. X.PR keyb
  1294. Xhas been
  1295. Xcreated to emulate one user typing at a terminal.
  1296. X.PR keyb
  1297. X(like
  1298. X.PR makework )
  1299. Xuses the environment variables
  1300. X.SV rate
  1301. Xand
  1302. X.SV tty
  1303. X(as set up by
  1304. X.PR run )
  1305. Xto know how fast to generate output and where the input
  1306. Xshould be echoed to.
  1307. X.LP
  1308. XOnce
  1309. X.PR run
  1310. Xwork has finished, it is \fBessential\fP
  1311. Xthat the following checks be performed.
  1312. X.IP (1)
  1313. XLook in the file
  1314. X.FL Results/log .
  1315. XCheck for wild variances in the execution times (a sign that not all job streams
  1316. Xare being run to completion), and any obscure error messages that would
  1317. Xhave been generated on stderr from
  1318. X.PR makework .
  1319. XMake sure that the execution times look reasonable.
  1320. XOne easy check is that the CPU time for ``n'' users
  1321. X\f2must be at least\fP
  1322. X\&``n'' times the CPU time for one simulated user, since the CPU times
  1323. Xshould be nearly the same for all users in a given run (although
  1324. Xthe CPU time per user is expected to rise as the number of concurrent
  1325. Xusers increases).
  1326. X.IP (2)
  1327. XCheck the file
  1328. X.FL Results/log.work
  1329. Xthat contains echoed comments, status information
  1330. Xand shell error output from the simulated user work.
  1331. X.nr II 4n
  1332. X.LP
  1333. XThe lines preceded by a line of the form ``Tmp/userlog.nnn:'' are copies of
  1334. Xthe shell error output for simulated user ``nnn''.
  1335. XThis should consist of a row of ``# ''s (assuming root's 
  1336. X.PR /bin/sh
  1337. Xprompt is ``# '').
  1338. X.LP
  1339. XThe lines preceded by a line of the form ``Tmp/masterlog.nnn:'' are
  1340. Xthe standard error output from master number ``nnn''.
  1341. XMaster 0 is the real master
  1342. X.PR makework
  1343. Xprocess, the others are clones.
  1344. XCheck that there are no messages of the forms,
  1345. X.RS
  1346. X.nf
  1347. X.if t .HS
  1348. Xmakework: cannot open %s for std output
  1349. Xmakework: chdir to "%s" failed!
  1350. Xuser %d job %d pid %d done exit code %d
  1351. Xuser %d job %d pid %d done status 0x%x
  1352. Xuser %d job %d pid %d done exit code %d status 0x%x
  1353. Xclone %d done, pid %d exit code %d
  1354. Xclone %d done, pid %d status 0x%x
  1355. Xclone %d done, pid %d exit code %d status 0x%x
  1356. Xuser %d job %d pid %d killed off
  1357. X\&... reason ... pid %d killed off
  1358. X.if t .HE
  1359. X.fi
  1360. X.RE
  1361. X\fBAny\fP these messages indicate something has gone terribly wrong.
  1362. X.LP
  1363. XOn the other hand, messages of the form
  1364. X.RS
  1365. X.nf
  1366. X.if t .HS
  1367. Xmaster pid %d
  1368. Xclone %d pid %d
  1369. Xuser %d job %d pid %d pipe fd %d
  1370. Xuser %d job %d pid %d done
  1371. Xclone %d done, pid %d
  1372. X.if t .HE
  1373. X.fi
  1374. X.RE
  1375. Xare just warm reassurance that everything is going well.
  1376. X.nr II 0
  1377. X.NH 3.3 Miscellaneous
  1378. X.TN x
  1379. XLike ``run work'', except the initial filesystem status reporting,
  1380. Xtty bandwidth check
  1381. Xand clock checks are omitted.
  1382. XUseful when using the multi-user test for diagnostic purposes, and the
  1383. Xinitial housekeeping is not needed.
  1384. X.NH 4 "The Complete Test"
  1385. X.LP
  1386. XWhen everything is apparently installed and operating correctly, 
  1387. Xlogin as root, choose another inactive terminal running at 9600 baud
  1388. X(/dev/ttyx below) and start the whole charade as follows.
  1389. X.SC tty=/dev/ttyx
  1390. X.SC "export tty"
  1391. X.SC "rm Report/log Report/log.work"
  1392. X.SC "./run &"
  1393. X.LP
  1394. XOn a 4 Mbyte VAX 11/780, simulating 1, 4, 8, 16, 24 and 32
  1395. Xusers in the multi-user test, this takes about 5 hours to run!
  1396. X.NH 5 "What Does It All Mean?"
  1397. X.LP
  1398. XFinally one should be in a position to contemplate the summaries in
  1399. Xthe
  1400. X.FL Results/log
  1401. Xfile.
  1402. XLook in
  1403. X.FL Tools
  1404. Xfor the scripts
  1405. X.PR mktbl
  1406. Xand
  1407. X.PR mkcomp
  1408. Xto create
  1409. X.PR tbl
  1410. Xinput directly from the log files
  1411. Xfor a single system or to compare two systems.
  1412. XThis is most useful in comparison to the same tests run on another
  1413. Xsystem, or on another version of the same system.
  1414. X.LP
  1415. XLots of things can influence the results, and people interpreting
  1416. Xthe results should be aware of the following (probably incomplete)
  1417. Xlist.
  1418. X.IP (1)
  1419. XAvailable real memory for the disk block cache and user processes.
  1420. X.IP (2)
  1421. XThe physical disk hardware; number and type of spindles, controller
  1422. Xtype and paths to devices.
  1423. X.IP (3)
  1424. XThe logical disk arrangement; allocation of critical directories such
  1425. Xas 
  1426. X.PR /tmp , 
  1427. X.PR /usr
  1428. Xand user filesystem across physical devices, the number
  1429. Xand distribution of swap partitions.
  1430. X.IP (4)
  1431. XStandard of C compiler and optimizer; everything tested is written
  1432. Xin C, any improvements here will help everything (even the kernel!).
  1433. X.IP (5)
  1434. XPhysical block size for swapping and paging; some of the test programs
  1435. Xare very small and so may incur large physical i/o costs.
  1436. X.IP (6)
  1437. XFlavour of UNIX you are using.
  1438. X.IP (7)
  1439. XThe accuracy of real time measurements and flow control in
  1440. X.PR makework .
  1441. XCheck the output from
  1442. X.PR clock
  1443. Xin
  1444. X.FL Results/log
  1445. Xat the start of the multi-user
  1446. Xtest to determine the extent to which a controlling SIGALRM loop
  1447. Xmeasures wallclock time -- this can influence elapsed time in the
  1448. Xmulti-user test particularly.
  1449. X.NH 6 "Caveat Emptor"
  1450. X.LP
  1451. XThe MUSBUS tests have been widely distributed, and in some cases
  1452. Xtheir owners have not treated them kindly.
  1453. XThe following list details known pitfalls in running the tests
  1454. Xand the subsequent application of the results.
  1455. X.IP (1)
  1456. XThere are several versions of the test suite, Version 3.3 (and later
  1457. Xversions) in particular
  1458. Xare very different to earlier versions and results obtained
  1459. Xwith different versions of the suite cannot be meaningfully
  1460. Xcompared.
  1461. XI make no claim for the long-term
  1462. Xstability of MUSBUS, and so this evolutionary
  1463. Xprocess is likely to continue with future releases of the test suite.
  1464. X.IP (2)
  1465. XThere is \fBno\fP reason to suspect that the distributed workload
  1466. Xfor the multi-user test (i.e. the files
  1467. X.FL Tmp/script.?
  1468. Xand
  1469. X.FL Tmp/workload )
  1470. Xare representative of the user work profile at \fByour\fP installation(s).
  1471. XBe prepared to alter or rebuild the workload to reflect your
  1472. Xexpected system usage.
  1473. X.IP (3)
  1474. XResults have been known to vary
  1475. Xdramatically between releases of the UNIX you
  1476. Xare testing.
  1477. XThis reflects vendor tuning (sometimes breaking) of the UNIX port
  1478. Xand MUSBUS is a useful diagnostic tool in this area, provided the
  1479. XMUSBUS version and workload profile remain fixed.
  1480. X.IP (4)
  1481. XPoints (1) to (3) suggest that uncontrolled and uninformed
  1482. Xcomparisons of
  1483. XMUSBUS results is dangerous in the extreme.
  1484. XThis is the main reason that I have not published the large
  1485. Xcollection of results accumulated to date.
  1486. X.IP (5)
  1487. XRemember that the tests described in Section 3.1 are intended
  1488. Xfor \fBdiagnostic\fP use.
  1489. XIf you are interested in \fBperformance\fP, you should focus
  1490. Xupon the multi-user test described in Section 3.2.
  1491. X.IP (6)
  1492. XBeware of simulating \fBtoo few\fP users in the multi-user
  1493. Xtest.
  1494. XUseful information about system throughput and performance
  1495. Xunder heavy load conditions can usually be obtained by
  1496. Xextrapolation of various measures computed from the
  1497. XCPU and elapsed times for the multi-user tests with
  1498. Xvarious numbers of users.
  1499. XHowever this assumes the machine has been sufficiently loaded to
  1500. Xmove out of the \fIlinear\fP part of the performance curves.
  1501. XFor very fast machines, this may require emulation of
  1502. Xa \fIlarge\fP number of users in the multi-user test.
  1503. X.IP (7)
  1504. XBeware of simulating \fBtoo many\fP users in the multi-user
  1505. Xtest.
  1506. XUsing the default value for
  1507. X.SV ttys ,
  1508. X\fBall\fP simulated
  1509. Xtty output is directed to a \fIsingle\fP serial port.
  1510. XAs you increase the number of simulated users in the multi-user
  1511. Xtest (in response to Point (6) above) the serial port
  1512. Xbandwidth may become the limiting resource!
  1513. XThis is easy to fix by adding a list of more tty devices to the 
  1514. Xvalue of
  1515. X.SV ttys .
  1516. X.IP (8)
  1517. XBe warned that the multi-user test has ``broken'' several UNIX
  1518. Xports.
  1519. XCauses have been identified as implementation (configuration)
  1520. Xlimits in the system being tested (e.g. proc slots), real
  1521. Xbugs in the port or MUSBUS errors.
  1522. XThis list is basically in order of decreasing probability.
  1523. X.LP
  1524. XCommunication on MUSBUS experiences is welcomed at the
  1525. Xelectronic addresses on the first page of this document.
  1526. XIf you have found a problem, or can suggest a better testing
  1527. Xtechnique please let me know, so that future versions might
  1528. Xoffer real (as opposed to cosmetic) enhancements.
  1529. End-of-File-Grunt
  1530. if test 33901 -ne `cat 'Intro.nr' | wc -c`
  1531. then
  1532.     echo 'shar: transmission error (expected 33901 characters)'
  1533. fi
  1534. echo 'x - Makefile'
  1535. if test -f 'Makefile'
  1536. then
  1537.     echo 'shar: over-writing existing file Makefile'
  1538. fi
  1539. sed 's/^X//' > Makefile <<'End-of-File-Grunt'
  1540. X# MUSBUS Makefile
  1541. X# $Header: Makefile,v 3.18 87/09/17 06:35:58 kenj Exp $
  1542. XCFLAGS = -O -DBSD4v2
  1543. XPROGS = arithoh register short int long float double hanoi \
  1544. X    randmem seqmem fstime \
  1545. X    syscall context1 pipe spawn execl makework keyb \
  1546. X    iamalive limit clock precision ttychk mkperm
  1547. XMOSTPROGS = arithoh register short int long float double hanoi \
  1548. X    randmem seqmem fstime \
  1549. X    syscall context1 pipe spawn execl limit precision \
  1550. X    mkperm
  1551. XDATAFILES = BSDtime.awk Groan Intro.nr SysVtime.awk \
  1552. X    check.sed cleanup dc.dat fs.awk mem.awk \
  1553. X    mkscript run time.awk README
  1554. XSOURCES = arith.c mem.c fstime.c syscall.c context1.c pipe.c spawn.c \
  1555. X    big.c execl.c makework.c util.c getwork.c keyb.c iamalive.c \
  1556. X    limit.c clock.c precision.c ttychk.c mkperm.c makework.h \
  1557. X    cctest.c hanoi.c \
  1558. X    mkdistrib mkinstall musbus.1
  1559. XTOOLS = Adjust Config comptbl.1 comptbl.2 comptbl.3 comptbl.4 comptbl.5 \
  1560. X    mk1 mk2 mkcomp mktbl tbl.1 tbl.2 tbl.3 tbl.4 tbl.5 
  1561. XWORKS = Makefile,1 cat.dat dummy.c edit.dat edscr1.dat edscr2.dat \
  1562. X    grep.dat mkprofile mkscript.out script.master
  1563. XMANIFESTS = Workload.files Results.files Tools.files
  1564. XXSCRIPTS = Tools/Adjust Tools/Config Tools/mk1 Tools/mk2 Tools/mkcomp \
  1565. X    Tools/mktbl \
  1566. X    Workload/mkprofile Workload/mkscript.out \
  1567. X    Groan cleanup mkdistrib mkinstall mkscript run
  1568. X# Create all the binaries
  1569. Xprograms:    source $(PROGS)
  1570. Xsource:    $(SOURCES) $(DATAFILES)
  1571. Xinstall:
  1572. X    @chmod 755 mkinstall
  1573. X    ./mkinstall
  1574. X    @chmod 755 $(XSCRIPTS)
  1575. Xunrcs:    $(SOURCES) $(DATAFILES) $(TOOLS) $(WORKS) $(MANIFESTS)
  1576. X# Workload scripts
  1577. Xscript:    Tmp Tmp/script.1 Tmp/script.out
  1578. X# Individual programs
  1579. Xarithoh:    arith.c
  1580. X    cc -o arithoh ${CFLAGS} -Darithoh arith.c
  1581. Xregister:    arith.c
  1582. X    cc -o register ${CFLAGS} -Ddatum=register arith.c
  1583. Xshort:    arith.c
  1584. X    cc -o short ${CFLAGS} -Ddatum=short arith.c
  1585. Xint:    arith.c
  1586. X    cc -o int ${CFLAGS} -Ddatum=int arith.c
  1587. Xlong:    arith.c
  1588. X    cc -o long ${CFLAGS} -Ddatum=long arith.c
  1589. Xfloat:    arith.c
  1590. X    cc -o float ${CFLAGS} -Ddatum=float arith.c
  1591. Xdouble:    arith.c
  1592. X    cc -o double ${CFLAGS} -Ddatum=double arith.c
  1593. Xhanoi:    hanoi.c
  1594. X    cc -o hanoi ${CFLAGS} hanoi.c
  1595. Xrandmem:    mem.c
  1596. X    cc -o randmem ${CFLAGS} -Dawk -Drandom mem.c
  1597. Xseqmem:    mem.c
  1598. X    cc -o seqmem ${CFLAGS} -Dawk mem.c
  1599. Xfstime:    fstime.c
  1600. X    cc -o fstime ${CFLAGS} -Dawk=1 fstime.c
  1601. Xsyscall:    syscall.c
  1602. X    cc -o syscall ${CFLAGS} syscall.c
  1603. Xcontext1:    context1.c
  1604. X    cc -o context1 ${CFLAGS} context1.c
  1605. Xpipe:    pipe.c
  1606. X    cc -o pipe ${CFLAGS} pipe.c
  1607. Xspawn:    spawn.c
  1608. X    cc -o spawn ${CFLAGS} spawn.c
  1609. Xexecl:    execl.c big.c
  1610. X    cc -o execl ${CFLAGS} execl.c
  1611. Xmakework:    makework.o util.o getwork.o
  1612. X    cc -o makework $(CFLAGS) makework.o util.o getwork.o
  1613. Xmakework.o:    makework.c makework.h
  1614. Xutil.o:    util.c makework.h
  1615. Xgetwork.o:    getwork.c makework.h
  1616. Xkeyb:    keyb.c
  1617. X    cc -o keyb ${CFLAGS} keyb.c
  1618. Xiamalive:    iamalive.c
  1619. X    cc -o iamalive ${CFLAGS} iamalive.c
  1620. Xlimit:    limit.c
  1621. X    cc -o limit ${CFLAGS} limit.c
  1622. Xclock:    clock.c
  1623. X    cc -o clock ${CFLAGS} clock.c
  1624. Xprecision:    precision.c
  1625. X    cc -o precision ${CFLAGS} precision.c
  1626. Xttychk:    ttychk.c
  1627. X    cc -o ttychk ${CFLAGS} ttychk.c
  1628. Xmkperm:    mkperm.c
  1629. X    cc -o mkperm ${CFLAGS} mkperm.c
  1630. XTmp/script.1:     Workload/script.master mkperm mkscript
  1631. X    ./mkscript 4 Workload/script.master
  1632. X    rm -f Tmp/script.[1-4]
  1633. X    mv script.[1-4] Tmp
  1634. XTmp/script.out:     Workload/script.master
  1635. X    cd Workload ; make script.out
  1636. X    rm -f Tmp/script.out
  1637. X    mv Workload/script.out Tmp
  1638. X# Clean out the unnecessary stuff before the multi-user test
  1639. Xinitwork:    clean
  1640. X    /bin/rm -f *.o core a.out ${MOSTPROGS}
  1641. X# Housekeeping
  1642. Xprint:
  1643. X    pr run *.c cleanup *.awk *.sed workload script.master edscript.? | lpr
  1644. Xmodes:
  1645. X    chmod 444 *.c *.awk
  1646. X    cd Work ; chmod 444 *.c *.dat script.* workload
  1647. X    chmod 444 Intro.nr Makefile check.sed
  1648. X    chmod 555 Config Groan cleanup run 
  1649. Xclean:    Tmp
  1650. X    @cd Tmp ; /bin/rm -f a.out core *.o *.tmp ed.hup script.?.time
  1651. X    @cd Tmp ; /bin/rm -f masterlog.* userlog.* loggederrs
  1652. Xpurge:    clean
  1653. X    @/bin/rm -f *.o core a.out ${PROGS}
  1654. X    @cd Tmp ; /bin/rm -rf *
  1655. XTmp:
  1656. X    @mkdir Tmp
  1657. X.DEFAULT:
  1658. X    co $@
  1659. End-of-File-Grunt
  1660. if test 3857 -ne `cat 'Makefile' | wc -c`
  1661. then
  1662.     echo 'shar: transmission error (expected 3857 characters)'
  1663. fi
  1664. echo 'x - Makefile,1'
  1665. if test -f 'Makefile,1'
  1666. then
  1667.     echo 'shar: over-writing existing file Makefile,1'
  1668. fi
  1669. sed 's/^X//' > Makefile,1 <<'End-of-File-Grunt'
  1670. X# $Header: Workload.make,v 1.1 87/06/23 15:14:00 kjmcdonell Beta $
  1671. XDUMMY    = aa.1.dat aa.2.dat aa.3.dat aa.4.dat aa.5.dat aa.6.dat \
  1672. X    mm.1.dat mm.2.dat mm.3.dat mm.4.dat mm.5.dat mm.6.dat \
  1673. X    zz.1.dat zz.2.dat zz.3.dat zz.4.dat zz.5.dat zz.6.dat
  1674. XDATA    = cat.dat cctest.c dummy.c edit.dat edscr1.dat edscr2.dat \
  1675. X    grep.dat script.master
  1676. X
  1677. Xcontext: $(DATA) $(DUMMY) keyb
  1678. X
  1679. Xclean:
  1680. X    rm -f $(DUMMY) core script.? script.out workload keyb cctest.c
  1681. X    rm -rf .tmp
  1682. X
  1683. Xscript.out:    script.master
  1684. X    ./mkscript.out
  1685. X
  1686. X$(DUMMY):
  1687. X    touch $@
  1688. X
  1689. Xkeyb:    ../keyb
  1690. X    cp ../keyb keyb
  1691. X../keyb:
  1692. X    cd .. ; make keyb
  1693. Xcctest.c:    ../cctest.c
  1694. X    cp ../cctest.c .
  1695. X../cctest.c:
  1696. X    cd .. ; make cctest.c
  1697. X
  1698. X.DEFAULT:
  1699. X    co ../RCS/$@,v
  1700. End-of-File-Grunt
  1701. if test 676 -ne `cat 'Makefile,1' | wc -c`
  1702. then
  1703.     echo 'shar: transmission error (expected 676 characters)'
  1704. fi
  1705. echo 'x - README'
  1706. if test -f 'README'
  1707. then
  1708.     echo 'shar: over-writing existing file README'
  1709. fi
  1710. sed 's/^X//' > README <<'End-of-File-Grunt'
  1711. XMUSBUS - Monash University Software for Benchmarking Unix Systems
  1712. X
  1713. XMUSBUS Version 5.0 -- Installation Notes
  1714. X
  1715. X1) make install
  1716. X    - creates relevant subdirectories and moves files about
  1717. X    - if the distribution has already been unpacked, this
  1718. X      will do nothing, so it cannot hurt!
  1719. X
  1720. X2) Format and read the installation notes and user guide, as in
  1721. X
  1722. X    [tn]roff Intro.nr | ...
  1723. X
  1724. X3) Follow the instructions therein.
  1725. X
  1726. X4) Note that the distributed workload profile (Workload/* when unpacked)
  1727. X   may not be representative of your system's current or anticipated
  1728. X   user profile, in which case the scripts and data files should be
  1729. X   changed -- see Intro.nr for details and implications.
  1730. End-of-File-Grunt
  1731. if test 672 -ne `cat 'README' | wc -c`
  1732. then
  1733.     echo 'shar: transmission error (expected 672 characters)'
  1734. fi
  1735. echo 'x - Results.files'
  1736. if test -f 'Results.files'
  1737. then
  1738.     echo 'shar: over-writing existing file Results.files'
  1739. fi
  1740. sed 's/^X//' > Results.files <<'End-of-File-Grunt'
  1741. Xlog.785
  1742. Xlog.sun3-50
  1743. Xlog.uVaxII
  1744. End-of-File-Grunt
  1745. if test 31 -ne `cat 'Results.files' | wc -c`
  1746. then
  1747.     echo 'shar: transmission error (expected 31 characters)'
  1748. fi
  1749. echo 'x - SysVtime.awk'
  1750. if test -f 'SysVtime.awk'
  1751. then
  1752.     echo 'shar: over-writing existing file SysVtime.awk'
  1753. fi
  1754. sed 's/^X//' > SysVtime.awk <<'End-of-File-Grunt'
  1755. X# $Header: SysVtime.awk,v 3.4 87/06/22 14:27:23 kjmcdonell Beta $
  1756. X/^[Rr]eal/ {
  1757. X    if (!fail) {
  1758. X        l=length($2); m=substr($2,1,l-5); s=substr($2,l-3,4)
  1759. X        t=m*60+s; real+=t; r2+=t*t; ok++
  1760. X    }
  1761. X    iter++; fail=0; next }
  1762. X/^[Uu]ser/ {
  1763. X    l=length($2); m=substr($2,1,l-5); s=substr($2,l-3,4)
  1764. X    t=m*60+s; user+=t; cpu=t; next }
  1765. X/^[Ss]ys/ {
  1766. X    l=length($2); m=substr($2,1,l-5); s=substr($2,l-3,4)
  1767. X    t=m*60+s; sys+=t; c2+=(cpu+t)*(cpu+t); next }
  1768. X/^$/    { next }
  1769. X    { print "** Iteration ",iter+1," Failed: ",$0; fail=1 }
  1770. XEND {
  1771. X    if (fail) iter++
  1772. X    if (ok != iter) {
  1773. X        printf "For %d successful iterations from %d attempts ...\n",ok,iter
  1774. X        iter=ok
  1775. X    }
  1776. X    if (iter > 0) {
  1777. X        printf "Elapsed Time: %.2f seconds",real/iter
  1778. X        if (iter > 1) printf " (variance %.3f)",(r2-2*real*real/iter+real*real/iter)/(iter-1)
  1779. X        cpu=sys+user
  1780. X        printf "\nCPU Time: %.2f seconds [ %.2fu + %.2fs ]",cpu/iter,user/iter,sys/iter
  1781. X        if (iter > 1) printf " (variance %.3f)",(c2-2*cpu*cpu/iter+cpu*cpu/iter)/(iter-1)
  1782. X        print
  1783. X    } else {
  1784. X        print "Elapsed Time: -- no measured results!!"
  1785. X        print "CPU Time: -- no measured results!!"
  1786. X    }
  1787. X    }
  1788. End-of-File-Grunt
  1789. if test 1113 -ne `cat 'SysVtime.awk' | wc -c`
  1790. then
  1791.     echo 'shar: transmission error (expected 1113 characters)'
  1792. fi
  1793. echo 'x - Tools.files'
  1794. if test -f 'Tools.files'
  1795. then
  1796.     echo 'shar: over-writing existing file Tools.files'
  1797. fi
  1798. sed 's/^X//' > Tools.files <<'End-of-File-Grunt'
  1799. XAdjust
  1800. XConfig
  1801. Xcomptbl.1
  1802. Xcomptbl.2
  1803. Xcomptbl.3
  1804. Xcomptbl.4
  1805. Xcomptbl.5
  1806. Xmk1
  1807. Xmk2
  1808. Xmkcomp
  1809. Xmktbl
  1810. Xtbl.1
  1811. Xtbl.2
  1812. Xtbl.3
  1813. Xtbl.4
  1814. Xtbl.5
  1815. End-of-File-Grunt
  1816. if test 115 -ne `cat 'Tools.files' | wc -c`
  1817. then
  1818.     echo 'shar: transmission error (expected 115 characters)'
  1819. fi
  1820. echo 'x - Workload.files'
  1821. if test -f 'Workload.files'
  1822. then
  1823.     echo 'shar: over-writing existing file Workload.files'
  1824. fi
  1825. sed 's/^X//' > Workload.files <<'End-of-File-Grunt'
  1826. XMakefile,1
  1827. Xcat.dat
  1828. Xdummy.c
  1829. Xedit.dat
  1830. Xedscr1.dat
  1831. Xedscr2.dat
  1832. Xgrep.dat
  1833. Xmkprofile
  1834. Xmkscript.out
  1835. Xscript.master
  1836. End-of-File-Grunt
  1837. if test 104 -ne `cat 'Workload.files' | wc -c`
  1838. then
  1839.     echo 'shar: transmission error (expected 104 characters)'
  1840. fi
  1841. echo 'x - arith.c'
  1842. if test -f 'arith.c'
  1843. then
  1844.     echo 'shar: over-writing existing file arith.c'
  1845. fi
  1846. sed 's/^X//' > arith.c <<'End-of-File-Grunt'
  1847. X
  1848. X/*
  1849. X *  arithmetic test
  1850. X *
  1851. X * $Header: arith.c,v 3.5 87/08/06 08:11:18 kenj Exp $
  1852. X */
  1853. X
  1854. Xmain(argc, argv)
  1855. Xint    argc;
  1856. Xchar    *argv[];
  1857. X{
  1858. X    int    iter;
  1859. X    int    i;
  1860. X#ifndef arithoh
  1861. X    datum    x, y, z;
  1862. X#endif
  1863. X
  1864. X    if (argc != 2) {
  1865. X        printf("Usage: %s count\n", argv[0]);
  1866. X        exit(1);
  1867. X    }
  1868. X
  1869. X    iter = atoi(argv[1]);
  1870. X
  1871. X    while (iter-- > 0) {
  1872. X#ifndef arithoh
  1873. X        z = 0;
  1874. X#endif
  1875. X        /*
  1876. X         *     101
  1877. X         * sum       i*i/(i*i-1)
  1878. X         *     i=2
  1879. X         */
  1880. X        for (i=2; i<=101; i++) {
  1881. X#ifndef arithoh
  1882. X            x = i;
  1883. X            y = x*x;
  1884. X            z += y/(y-1);
  1885. X#endif
  1886. X        }
  1887. X    }
  1888. X    exit(0);
  1889. X}
  1890. End-of-File-Grunt
  1891. if test 512 -ne `cat 'arith.c' | wc -c`
  1892. then
  1893.     echo 'shar: transmission error (expected 512 characters)'
  1894. fi
  1895.